﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace SHRP.UI.Command
{
    public abstract class CommandBase
    {
        public event EventHandler OnWorkerComplete;

        public abstract void CommandBody(object sender, params object[] paras);

        public void ExecuteAsyc(object sender, params object[] paras)
        {
            ThreadStart start = new ThreadStart(delegate()
                {
                    CommandBody(sender, paras);
                });
            start.BeginInvoke(null, null);
        }

        public abstract CommandFamily Family
        {
            get;
        }
    }
}
